package xin.printk.android.data.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import xin.printk.android.utils.LogUtils;

public class DatabaseHelper extends SQLiteOpenHelper {

    private static int VERSION = 1;

    public DatabaseHelper(Context context) {
        super(context, SQL.DATABASE, null, VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        LogUtils.d("DatabaseHelper onCreate start");
        db.execSQL(SQL.createUserTable);
        db.execSQL(SQL.insertDefaultUserRecord);
        db.execSQL(SQL.createPlanTable);
        LogUtils.d("DatabaseHelper onCreate end");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
